// 客户支付方式
export const PAY_TYPE_MAPS = {
  1: '账期支付',
  2: '在线支付',
  3: '线下转账',
  4: '货到付款',
}
// 是否厂直下拉选项
export const FACTORY_DIRECT_OPTIONS = [
  {
    value: 1,
    label: '是',
  },
  {
    value: 2,
    label: '否',
  },
]
export const TABLE_COLUMNS = [
  {
    label: '商品分类',
    prop: 'skuTypeStr',
  },
  {
    label: '商品代码',
    prop: 'skuCode',
  },
  {
    label: '商品名称',
    prop: 'skuName',
  },
  {
    label: '规格型号',
    prop: 'productSpec',
    width: 70,
  },
  {
    label: '单位',
    prop: 'unit',
    width: 50,
  },
  {
    label: '数量',
    prop: 'amount',
    width: 50,
  },
  {
    label: '售价',
    prop: 'sellPrice',
    width: 80,
  },
  {
    label: '图文完善状态',
    prop: 'imageStatusStr',
    width: 100,
  },
  {
    label: '线索准入状态',
    prop: 'tempToPotentialApproveStatusStr',
    width: 100,
  },
  {
    label: '驳回原因',
    prop: 'rejectReason',
  },
  {
    label: '驳回备注',
    prop: 'rejectRemark',
  },
]

export const TABLE_COLUMNS2 = [
  {
    label: '推荐供应商代码',
    prop: 'recommendSupplierCode',
    width: 120,
  },
  {
    label: '推荐供应商名称',
    prop: 'recommendSupplierName',
    width: 120,
  },
  {
    label: '供货信息',
    prop: 'productSupplyInfo',
    render: (h, { row }) => {
      if (!row.productSupplyInfoList) {
        return ''
      }
      return <el-popover
        placement="right"
        width="600"
        trigger="hover">
        <el-table border data={row.productSupplyInfoList}>
          <el-table-column property="supplierName" label="供货信息供应商"></el-table-column>
          <el-table-column property="purchasePrice" label="供货信息进价"></el-table-column>
          <el-table-column property="costPrice" label="供货信息成本价"></el-table-column>
        </el-table>
        <a slot="reference">查看</a>
      </el-popover>
    }
  },
  {
    label: '历史报价记录供应商',
    prop: 'historySupplierName',
    width: 140,
  },
  {
    label: '历史报价记录进价',
    prop: 'historySupplierUnitPrice',
    width: 120,
  },
  {
    label: '历史报价记录成本价',
    prop: 'historySupplierCostPrice',
    width: 140,
  },
  {
    label: '历史报价日期',
    prop: 'historyQuoteDate',
    width: 100,
  },
  {
    label: '询价时定标进价',
    prop: 'inquiryWinbiddingUnitPrice',
    width: 120,
  },
  {
    label: '询价时定标成本价',
    prop: 'inquiryWinbiddingCostPrice',
    width: 120,
  },
]

export const TABLE_COLUMNS3 = [
  {
    label: '归属中心',
    prop: 'belongDepartmentName',
  },
  {
    label: '是否厂家直送',
    prop: 'factoryDirect',
    width: 100
  },
  {
    label: '成本价',
    prop: 'costPrice',
  },
  {
    label: '中标数量',
    prop: 'skuNum',
    // type: 'inputNumChange',
    width: 125,
    class: 'active',
  },
  {
    label: '中标金额',
    prop: 'skuPrice',
  },
  {
    label: '报价金额',
    prop: 'totalPrice',
  },
  {
    label: '落实到货时间',
    prop: 'workableArrivalTime',
  },
  {
    label: '备注',
    prop: 'remark',
    // type: 'input',
    width: 100,
  },
  {
    label: '供应商发票类型',
    prop: 'invoiceTypeStr',
    width: 110,
  },
  {
    label: '无票采购原因',
    prop: 'noTaxInvoiceApprovalRemark',
    width: 160,
  },
  {
    label: '成本差异比例(%)',
    prop: 'costDiffScale',
    width: 120,
  },
  {
    label: '成本差异比例超10%备注',
    prop: 'costDiffExceedTenRemark',
    // type: 'input',
    width: 160,
  },
]

export const TABLE_COLUMNS3_PROPS = TABLE_COLUMNS3.map(item => item.prop)

export const TABLE_COLUMNS3_VIEW = [
  {
    label: '归属中心',
    prop: 'belongDepartmentName',
  },
  {
    label: '是否厂家直送',
    prop: 'factoryDirectStr',
  },
  {
    label: '成本价',
    prop: 'costPrice',
  },
  {
    label: '中标数量',
    prop: 'skuNum',
  },
  {
    label: '中标金额',
    prop: 'skuPrice',
  },
  {
    label: '报价金额',
    prop: 'totalPrice',
  },
  {
    label: '落实到货时间',
    prop: 'workableArrivalTime',
  },
  {
    label: '备注',
    prop: 'remark',
  },
  {
    label: '供应商发票类型',
    prop: 'invoiceTypeStr',
    width: 110,
  },
  {
    label: '无票采购原因',
    prop: 'noTaxInvoiceApprovalRemark',
    width: 100,
  },
  {
    label: '成本差异比例(%)',
    prop: 'costDiffScale',
    width: 100,
  },
  {
    label: '成本差异比例超10%备注',
    prop: 'costDiffExceedTenRemark',
    width: 160,
  },
]

export const TABLE_COLUMNS3_VIEW_PROPS = TABLE_COLUMNS3_VIEW.map(item => item.prop)
